The present invention relates to resource management, and particularly to management of three dimensional resources, such as three dimensional memory space.
Memory space within a computer can be allocated for exclusive use by a particular application or process. Once the process is complete, the memory is deallocated and made available for subsequent allocation. Status information is maintained for each portion of the memory space. The status information indicates whether memory currently allocated, i.e., not available. When a process requires a block of memory, a suitable portion of available memory is first identified and then allocated to the process. Memory allocation is normally performed on a block basis where a block, i.e., a contiguous portion of memory locations, is allocated to a given process.
Management of a memory resource includes three basic operations: allocation, deallocation and consolidation. In the allocation phase, the computer receives a request for a block of memory, identifies a suitable non-allocated block of memory, and allocates the identified block by first marking the block as allocated and then communicating to the requesting process which block of memory is available for use. In the deallocation phase, the computer receives a communication indicating that a process is done with a previously allocated block of memory and then marks that block a being available for subsequent allocation.
In dividing or partitioning a memory resource for allocation, the computer necessarily fragments the memory into a number of blocks. If this process continues unchecked, eventually the memory is divided into many small blocks of memory and the computer is unable to satisfy allocation requests for memory portions larger than the largest fragment. Thus, in the consolidation phase, the computer attempts to join one or several contiguous blocks of available memory to form a larger contiguous memory block.
It may be appreciated that under this resource management scheme many different requesting processes have exclusive use of selected allocated portions of the memory resource. While some fragmentation of memory is inherent in allocation of memory blocks, it is advantageous to minimize the effect of such fragmentation by maximizing certain memory fragment dimensions. Also, it is desireable to provide efficient means for consolidating previously allocated blocks.